// useUsersModal

import { userList } from "@/services/project";
import { useEffect, useState } from "react";

export const useUsersModel = () => {
  const [users, setUsers] = useState<any[]>([]);
  useEffect(() => {
    fetchUserList();
  }, []);
  const fetchUserList = async () => {
    const { data } = await userList();
    setUsers(data);
  };
  return {
    users,
    fetchUserList,
  };
};
